const {
    PlanType
} = require('../../../model/plan/planType');


module.exports = async (req, res) => {
    let data = await PlanType.find().sort('-createTime');

    let list = data.map((item) => {
        return Object.assign({}, { 'id': item._id, 'name': item.name })
    })
    res.send({ 'code': 0, "data": list });
}